const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: "warning",
  // 配置代理服务器
  devServer: {
    open: true,
    port: 8080,
    host: 'localhost',
    proxy: {
      '/api': {
        target: process.env.VUE_APP_BASE_API, // 目标服务器地址
        changeOrigin: true,
        pathRewrite: {'^/api': ''}
      }
    }
  }
})
